<template>
  <div>
    <template>
      <el-tabs v-model="activeName" @tab-click="handleClick" class="title">
        <el-tab-pane label="用户列表" name="first"></el-tab-pane>
        <el-tab-pane label="添加用户" name="second"></el-tab-pane>
      </el-tabs>
    </template>
    <div class="usermanage" :is="currentComponent"></div>
  </div>
</template>
<script>
import zjShow from "../../../components/usermanage1showdata";
import zjUpdata from "../../../components/usermanage2updata";
export default {
  data() {
    return {
        activeName: 'first',
        currentComponent:"zjShow",
    };
  },
  components: {
    zjShow,
    zjUpdata,
  },
  methods: {
    handleClick(tab, event) {
    //   console.log(tab, event);
      if(tab.name=="first"){
        this.currentComponent="zjShow"
      }else{
        this.currentComponent="zjUpdata"
      }
    }
   }
};
</script>
<style scoped lang="less">
    .title{
        margin:20px 0;
    }
</style>